from zhipuai import ZhipuAI

def zhipu_api(m,k="",model='glm-4'):
    client = ZhipuAI(api_key = k)
    response = client.chat.completions.create(
        model = model,
        messages = m,
        # stream = True
    )
    return response.choices[0].message.content